HTMLify
style.css
Views: 19 | Author: cody
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | @import url("https://fonts.googleapis.com/css2?family=Montserrat&display=swap"); * {box-sizing: border-box;} body { font-family: "Montserrat", sans-serif; background-color: #fff; display: flex; justify-content: center; align-items: center; flex-direction: column; text-align: center; min-height: 100vh; margin: 0; transition: background 0.2s linear; } body.dark {background-color: #292c35;} /* #9b59b6 */ body.dark h1, body.dark .support a {color: #fff;} .checkbox { opacity: 0; position: absolute; } .checkbox-label { background-color: #111; width: 50px; height: 26px; border-radius: 50px; position: relative; padding: 5px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; } .fa-moon {color: #f1c40f;} .fa-sun {color: #f39c12;} .checkbox-label .ball { background-color: #fff; width: 22px; height: 22px; position: absolute; left: 2px; top: 2px; border-radius: 50%; transition: transform 0.2s linear; } .checkbox:checked + .checkbox-label .ball { transform: translateX(24px); } |